ci: SQL E2E over all three VGI transports (subprocess + http + unix)#1
Merged
Conversation
… http + unix)
Parameterize ci/run-integration.sh by a TRANSPORT env (subprocess|http|unix)
and run the SAME test/sql/*.test suite over each, in CI as a
transport × os matrix (3 transports × {ubuntu, macos}).
The in-process mock provider server (tests/mock_server.py) is started ONCE,
out of band (via `python -m tests.mock_server`, which now prints URL:<base>
and blocks), and its VGI_SCHOLAR_*_BASE_URL vars are exported so the worker
reads them over every transport — stdio, HTTP, or AF_UNIX. For http/unix the
script boots the worker itself (cwd = repo) and discovers the endpoint:
http via `--http --port 0 --port-file <f>` (poll the file), unix via
`--unix <sock>` (poll for the socket). A single cleanup() (capturing $? first)
kills both the mock server and the worker.
http leg specifics (resolved, not gated):
- inject `INSTALL httpfs FROM core; LOAD httpfs;` after each `LOAD vgi;`
(the vgi HTTP transport runs on DuckDB's httpfs);
- the http extra (waitress): add `http = ["vgi-python[http]>=0.8.3"]` to
pyproject and bump scholar_worker.py's PEP 723 dep to vgi-python[http];
CI syncs `--extra http`.
- SILENT-SKIP GUARD: fail the leg unless the runner reports
`All tests passed (N>0 assertions)` and zero skips (the runner auto-SKIPs
any "HTTP"/"Unable to connect" error → a fake green).
scholar_search paging already works over HTTP unchanged: its per-scan cursor
is externalized in _ScanState(ArrowSerializableDataclass), which the framework
round-trips through its continuation token across ticks/requests. No worker fix
was needed.
Status: subprocess=GREEN (33 assertions), unix=GREEN (33), http=GREEN
(35 = 33 + the injected httpfs INSTALL/LOAD).
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds subprocess + http + unix VGI transport coverage to the SQL E2E suite, with the full
test/sql/*.testsuite GREEN over all three transports in CI.What changed
ci/run-integration.shparameterized byTRANSPORT(defaultsubprocess). The in-process mock provider server is started once, out of band (python -m tests.mock_server, now printsURL:<base>and blocks), and itsVGI_SCHOLAR_*_BASE_URLvars are exported so the worker reads them over every transport. For http/unix the script boots the worker itself and discovers the endpoint (http:--http --port 0 --port-file; unix:--unix <sock>). A singlecleanup()(capturing$?first) kills both the mock server and the worker..github/workflows/ci.yml— theintegrationjob is now atransport: [subprocess, http, unix]×os: [ubuntu, macos]matrix (6 legs). Test + lint jobs unchanged.INSTALL httpfs FROM core; LOAD httpfs;(the vgi HTTP transport runs on DuckDB's httpfs), adds thehttpextra (waitress) topyproject.toml+ the PEP 723 header, syncs--extra http, and enforces a silent-skip guard (fail unlessAll tests passed (N>0)and zero skips — the runner auto-SKIPsHTTP/Unable to connecterrors → a fake green).tests/mock_server.pygains amain()/__main__entry that advertises its URL and blocks.Streaming over HTTP — no worker fix needed
scholar_search's per-scan cursor is already externalized in_ScanState(ArrowSerializableDataclass), which the framework round-trips through its continuation token across ticks/requests, so the paging round-trip runs unchanged over HTTP.Local status
🤖 Generated with Claude Code